using System.Collections;
using Core.Blocker;
using Modules.UI.Sub;

namespace Toolkit.UI
{
    public static class PageExpand
    {
        public static IEnumerator WaitUnblocked(this SubPage subpage)
        {
            if (subpage is IBlocker blocker)
                return blocker.WaitUnblocked();
            throw new System.Exception($"'{nameof(subpage)}'未实现'IBlocker'接口...");
        }
    }
}